package com.ebocy.hammer.core.socket.codecFilter;

import org.apache.mina.core.session.IoSession;
import org.apache.mina.filter.codec.ProtocolEncoder;
import org.apache.mina.filter.codec.ProtocolEncoderOutput;

public class AsResponseEncoder implements ProtocolEncoder{

	@Override
	public void encode(IoSession session, Object message,
			ProtocolEncoderOutput out) throws Exception {
		/**
		IoBuffer buffer = (IoBuffer) message;
		byte[] bytes = buffer.array();
		buffer.putInt(buffer.remaining() + 4);
		buffer.put(bytes);// 消息内容
		buffer.flip();
		out.write(buffer);
		out.flush();
		*/
	}

	@Override
	public void dispose(IoSession session) throws Exception {

	}

}
